package com.example.androidstudy;



import com.example.androidstudy.ch04.ButtonAndEditText;
import com.example.androidstudy.ch04.ImageViewTest;
import com.example.androidstudy.ch05.FrameEx;
import com.example.androidstudy.ch05.GravityEx1;
import com.example.androidstudy.ch05.PaddingEx;
import com.example.androidstudy.ch05.RelativeEx;
import com.example.androidstudy.ch05.Tablestart;
import com.example.androidstudy.ch06.CodeLayout;
import com.example.androidstudy.ch06.InflationEx;
import com.example.androidstudy.ch06.LayoutParmeterEx;
import com.example.androidstudy.ch06.MultPageEx;
import com.example.androidstudy.ch06.SetParameterEx;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	public void mOnClick(View v){
		switch(v.getId()){
		case R.id.btnandedit_btn:
			startActivity(new Intent(this, ButtonAndEditText.class));
			break;
		case R.id.imageviewtest_btn:
			startActivity(new Intent(this, ImageViewTest.class));
			break;
		case R.id.main_weight_btn:
			startActivity(new Intent(this, GravityEx1.class));
			break;
		case R.id.main_padding:
			startActivity(new Intent(this, PaddingEx.class));
			break;
		case R.id.main_relative_btn:
			startActivity(new Intent(this, RelativeEx.class));
			break;
		case R.id.main_layout_btn:
			startActivity(new Intent(this,FrameEx.class));
			break;
		case R.id.main_table_k:
			startActivity(new Intent(this,Tablestart.class));
			break;
		case R.id.mult_multpage_btn:
			startActivity(new Intent(this,MultPageEx.class));
			break;
		case R.id.main_codelayout:
			startActivity(new Intent(this,CodeLayout.class));
		case R.id.main_inflat_btn:
			startActivity(new Intent(this,InflationEx.class));
			break;
		case R.id.main_ViewX:
			startActivity(new Intent(this,LayoutParmeterEx.class));
			break;
		case R.id.main_setparameter:
			startActivity(new Intent(this,SetParameterEx.class));
			break;
		
		}
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
